<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'新建账户'))}
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   >
		<div class="frame">
			<div class="frame">
				<input type="hidden" id="ajax" name="ajax" value="0">
				<input type="hidden" id="doc_type" name="doc_type" value="1">
				<input type="hidden" id="opmode" name="opmode" value="add">
				
					<div class="box col-12">
						<label class="input-label" for="name">名称：</label>
						
							<input class="input" type="text" id="name" name="name" check="required" info="请输入名称">
						</div>
					</div>
				</div>
			</div>
			<div class="frame">
				<div class="box col-12">
					
						<label class="input-label" for="bank" >开户银行：</label>
						
							<input  class="input" type="text" id="bank" name="bank" check="required" info="请输入开户银行">
						</div>
					</div>
				</div>
				<div class="box col-12">
					<div class="layui-form-item ">
						<label class="input-label" for="no">帐号：</label>
						
							<input  class="input" type="text" id="no" name="no" check="required" info="请输入帐号">
						</div>
					</div>
				</div>
			</div>
			<div class="frame">

				<div class="box col-12">
					
						<label class="input-label" for="init">初始金额：</label>
						
							<input type="text" name="init" id="init" class="input">
						</div>
					</div>
				</div>
				<div class="box col-12">
					
						<label class="input-label" for="balance">当前余额：</label>
						
							<input type="text" id="balance" name="balance" readonly="readonly" class="input">
						</div>
					</div>
				</div>

			</div>
			<div class="frame">

				<div class="box col-12">
					
						<label class="input-label" for="remark">摘要：</label>
						
							<textarea name="remark" rows="5" style="height:200px;" class="textarea simple"></textarea>
						</div>
					</div>
					
						
							<a class="btn btn-normal" onclick="save()">保存</a>
							<a class="btn btn-return" onclick="go_return_url()">取消 </a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
</block>
<block name="js">
	<script>
		layui.use(['global', 'editor'], function() {
			var $ = layui.jquery;

			$("#btn_save").on('click', function() {
				$("#balance").val($("#init").val());
				send_form("form_data", "{:url('save_account')}", "{:url('account_list')}");
			});
		});
	</script>
</block>